#include <iostream>

using namespace std;

#define N 10

// FIXME: do not define the function using const define number
//        try to use following function define
//  void select_sort(int *a, int item_num);
void selectsort(int a[N]);

int main( )
{
    int a[N],i;
    cout<<"enter the element"<<endl;
    for(i=0;i<N;i++)
    {
        cin>>a[i];
    }

    selectsort(a);

    for(i=0;i<N;i++)
    {
        cout<<a[i]<<" ";
    }

    cin>>i;
    return 0;
}

void selectsort(int a[N])
{ 
    int i,j,k,t;

    for(i=0;i<N-1;i++)
    {
        k=i;

        for(j=i+1;j<N;j++)
        {
            if(a[j]>a[k])  k=j;
        }

        if(i!=k)
        {
            t=a[i];
            a[i]=a[k];
            a[k]=t;
        }
    }

}

